<link rel="stylesheet" href="<?php echo base_url()?>jqgrid/css/jquery-ui.css" type="text/css" media="all" />
<link rel="stylesheet" href="<?php echo base_url()?>jqgrid/css/ui.theme.css" type="text/css" media="all" />
<link type="text/css" href="<?php echo base_url()?>jqgrid/css/ui.jqgrid.css" rel="stylesheet" />
<link type="text/css" href="<?php echo base_url()?>jqgrid/css/jquery.searchFilter.css" rel="stylesheet" />

<script type="text/javascript" src="<?php echo base_url(); ?>jqgrid/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>jqgrid/js/i18n/grid.locale-en.js"></script>

<script type="text/javascript" src="<?php echo base_url(); ?>jqgrid/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>jqgrid/jquery.layout.js"></script>

<?php
		//$ci =& get_instance();
		$base_url = base_url();
?>

<script type="text/javascript">
	$(document).ready(function () {
		$("#list1").jqGrid({
	  		url:'<?php echo $base_url.'index.php/daily/loadDataGrid'?>',      //another controller function for generating data
			mtype : "post",             //Ajax request type. It also could be GET
			datatype: "json",            //supported formats XML, JSON or Arrray
		   	colNames:['Date','Name','Amount','alamat'],       //Grid column headings
		   	colModel:[
						{name:'date',index:'date', width:30, align:"left",editable:true},
				   		{name:'name',index:'name', width:20, align:"left",editable:true},
				   		{name:'amount',index:'amount', width:20, align:"right",editable:true},
				   		{name:'alamat',index:'alamat', width:20, align:"right",editable:true},
		  			],
				   	rowNum:10,
				   	width: 700,
					height: 300,
				   	rowList:[10,20,30],
				   	pager: '#pager1',
				   	sortname: 'id',
				    viewrecords: true,
					rownumbers: true,
					gridview: true,
					caption:"List Daily"
				}).navGrid('#pager1',{edit:true,add:true,del:true,view:true},
					{url:'<?php echo $base_url.'index.php/daily/edit'?>'},
					{url:'<?php echo $base_url.'index.php/daily/add'?>'},
					{url:'<?php echo $base_url.'index.php/daily/delete'?>'},
					{}
				);
	});
</script>

<table id="list1"></table> <!--Grid table-->
<div id="pager1"></div>  <!--pagination div-->


